@echo off

REM SHA1 sums of files required
REM 9988723269367fb44ef83f627186a1c88cf7877e decoder.4
REM 30002643d08ed983a6701a7c4b5ee74a2f4a1adb decoder.6
REM 6ba4de6cc7d1359ed450da7bae1000552373f873 splat.01
REM 710aba98909d5d63c4b9b08579021f9c026b3111 splat.02
REM 727c9da682fd10353f3969ef02e9f1826d8cb77a splat.03
REM 7e6440585462b68b62d6d571d83635bf17149f1a splat.04
REM 6f88ba8ac72d9301760d6e2512549f70b5373c65 splat.05
REM 288a361691a7f147ff3346627a10531d613ad017 splat.06
REM c4d42b111a0357700ac2bf700117d75ffb3c5be5 splat.07
REM 73df546dd60870f63a8c3deffea2b2d13149a48b splat.08
REM bf22bedeceffdccc340637098070b32e9c13cf68 splat.09
REM de4f5ba2b92c47757dfd2ca810bf8f87338223f7 splat.10
REM 8e12f6d9eaf397646691ec5d02963b32973cb32e splat.11
REM b4ee99fb6c353093faf1e088bab82fec66e785bc splat.12
REM f3347a354cb54ca228fe0971f0ae3bc778e2aecf splat.snd

set rom_path_src=..\roms\splat
set rom_path_dst=..\build
set romgen_path=..\tools

mkdir %rom_path_dst%
REM generate RAMB structures for larger ROMS

REM soundcpu
%romgen_path%\romgen %rom_path_src%\splat.snd SND_ROM_0F       12 l r e > %rom_path_dst%\SND_ROM_0F.vhd

REM decoders
%romgen_path%\romgen %rom_path_src%\decoder.4    DECODER_4      9 a     > %rom_path_dst%\DEC_4.vhd
%romgen_path%\romgen %rom_path_src%\decoder.6    DECODER_6      9 a     > %rom_path_dst%\DEC_6.vhd

REM maincpu
%romgen_path%\romgen %rom_path_src%\splat.10 CPU_ROM_0D        12 l r e > %rom_path_dst%\CPU_ROM_0D.vhd
%romgen_path%\romgen %rom_path_src%\splat.11 CPU_ROM_0E        12 l r e > %rom_path_dst%\CPU_ROM_0E.vhd
%romgen_path%\romgen %rom_path_src%\splat.12 CPU_ROM_0F        12 l r e > %rom_path_dst%\CPU_ROM_0F.vhd
%romgen_path%\romgen %rom_path_src%\splat.01 CPU_ROM_10        12 l r e > %rom_path_dst%\CPU_ROM_10.vhd
%romgen_path%\romgen %rom_path_src%\splat.02 CPU_ROM_11        12 l r e > %rom_path_dst%\CPU_ROM_11.vhd
%romgen_path%\romgen %rom_path_src%\splat.03 CPU_ROM_12        12 l r e > %rom_path_dst%\CPU_ROM_12.vhd
%romgen_path%\romgen %rom_path_src%\splat.04 CPU_ROM_13        12 l r e > %rom_path_dst%\CPU_ROM_13.vhd
%romgen_path%\romgen %rom_path_src%\splat.05 CPU_ROM_14        12 l r e > %rom_path_dst%\CPU_ROM_14.vhd
%romgen_path%\romgen %rom_path_src%\splat.06 CPU_ROM_15        12 l r e > %rom_path_dst%\CPU_ROM_15.vhd
%romgen_path%\romgen %rom_path_src%\splat.07 CPU_ROM_16        12 l r e > %rom_path_dst%\CPU_ROM_16.vhd
%romgen_path%\romgen %rom_path_src%\splat.08 CPU_ROM_17        12 l r e > %rom_path_dst%\CPU_ROM_17.vhd
%romgen_path%\romgen %rom_path_src%\splat.09 CPU_ROM_18        12 l r e > %rom_path_dst%\CPU_ROM_18.vhd

echo done
pause
